package com.vvv.shortlink.project.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.vvv.shortlink.project.dao.entity.LinkDO;
import com.vvv.shortlink.project.dto.req.RecycleBinPageReqDTO;
import com.vvv.shortlink.project.dto.req.RecycleBinRecoverReqDTO;
import com.vvv.shortlink.project.dto.req.RecycleBinRemoveReqDTO;
import com.vvv.shortlink.project.dto.req.RecycleBinSaveReqDTO;
import com.vvv.shortlink.project.dto.resp.LinkPageRespDTO;

/**
 * @author vvv
 * @date 2024/2/19 14 54
 * discription
 */
public interface RecycleBinService extends IService<LinkDO> {

    /**
     * 将短链接移至回收站
     *
     * @param requestParam fullShortUrl gid userId
     */
    void saveLinkToBin(RecycleBinSaveReqDTO requestParam);

    /**
     * 分页查询回收站中的短链接
     *
     * @param requestParam gid
     * @return
     */
    IPage<LinkPageRespDTO> pageShortLinkInBin(RecycleBinPageReqDTO requestParam);

    /**
     * 从回收站中恢复短链接
     *
     * @param requestParam fullShortUrl gid userId
     */
    void recoverShortLink(RecycleBinRecoverReqDTO requestParam);

    /**
     * 从回收站中移除短链接
     *
     * @param requestParam fullShortUrl gid userId
     */
    void removeShortLinkFromBin(RecycleBinRemoveReqDTO requestParam);
}
